package com.gateway.enter.util;

import org.springframework.util.DigestUtils;

import java.util.Random;
import java.util.UUID;

/**
 * @author KLC0422
 * @create 2021-12-26- 10:10
 */

public class PasswordUtil {

    public static String password2Md5(String password){
        return DigestUtils.md5DigestAsHex(password.getBytes());
    }

    public static String randomSalt(){
        return UUID.randomUUID().toString().replaceAll("-","");
    }

}
